﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admins/SiteAdmin.Master" AutoEventWireup="true"
    CodeBehind="SanPhams.aspx.cs" Inherits="WebApplication.Admins.SanPhams" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="nav_qlsanpham">
        <asp:Button Text="Thêm" CssClass="sp_button" ID="btnThem" runat="server" />
        <asp:Button Text="Xóa"  CssClass="sp_button" ID="btnXoa" runat="server" />
        <asp:Button Text="Sửa"  CssClass="sp_button" ID="btnSua" runat="server" />
    </div>
    <asp:Repeater ID="repDSSanPham" runat="server">
        <HeaderTemplate>
            <table border="0" cellpadding="0" cellspacing"0">
                <tr class="sp_title">
                    <th>
                    #<input type="checkbox" id="chkAll" name="name" value=" " />
                    </th>
                     <th>
                    Hình Ảnh
                    </th>
                     <th>
                    Tên sản phẩm
                    </th>
                     <th>
                    Chủ đề
                    </th>
                     <th>
                    Loại sản phẩm
                    </th>
                     <th class="sp_gia">
                    Giá
                    </th>
                     <th class="sp_gia">
                    Đơn vị
                    </th>
                     <th class="sp_gia">
                    Ngày tạo
                    </th>
                     <th class="sp_gia">
                    Ngày gửi
                    </th>
                      <th class="cid">
                    Hiển thị
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
         <tr>
                    <th>
                        <input value='<%#Eval("IDSP") %>' name="cid" type="checkbox" />
                    </th>
                     <th>
                         <img src='<%#BLL.LinkBLL.ToHinhAnhSanPham(Eval("AnhXemTruoc").ToString()) %>' width="50px" height="50px" alt="anh xem truoc" />
                    </th>
                     <th>
                        <a href='EditSanPham.aspx?cid=<%#Eval("IDSP") %>'><%#Eval("TenSP") %></a>
                    </th>
                     <th>
                        <a href='EditChuDe.aspx?cid=<%#Eval("IDChuDe") %>'><%#Eval("IDChuDe") %></a>
                    </th>
                     <th>
                         <a href='EditLoaiSP.aspx?cid<%#Eval("IDLoaiSP") %>'><%#Eval("IDLoaiSP")%></a>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("Gia", "{0: 0,0}") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("DonVi") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("NgayTao", "{0:dd/MM/yyyy}") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("NgayGui", "{0:dd/MM/yyyy}") %>
                    </th>
                      <th class="cid">
                          <asp:LinkButton Text='<%#Eval("HienThi") %>' CommandName="CapNhatHienThi"
                          CommandArgument='<%#Eval("IDSP").ToString() + "_"+ Eval("HienThi").ToString()%>' runat="server" />   
                    </th>
                </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
        <tr class="sp_le">
                    <th>
                        <input value='<%#Eval("IDSP") %>' name="cid" type="checkbox" />
                    </th>
                     <th>
                         <img src='<%#BLL.LinkBLL.ToHinhAnhSanPham(Eval("AnhXemTruoc").ToString()) %>' width="50px" height="50px" alt="anh xem truoc" />
                    </th>
                     <th>
                        <a href='EditSanPham.aspx?cid=<%#Eval("IDSP") %>'><%#Eval("TenSP") %></a>
                    </th>
                     <th>
                        <a href='EditChuDe.aspx?cid=<%#Eval("IDChuDe") %>'><%#Eval("IDChuDe") %></a>
                    </th>
                     <th>
                         <a href='EditLoaiSP.aspx?cid<%#Eval("IDLoaiSP") %>'><%#Eval("IDLoaiSP")%></a>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("Gia", "{0: 0,0}") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("DonVi") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("NgayTao", "{0:dd/MM/yyyy}") %>
                    </th>
                     <th class="sp_gia">
                        <%#Eval("NgayGui", "{0:dd/MM/yyyy}") %>
                    </th>
                      <th class="cid">
                          <asp:LinkButton ID="LinkButton1" Text='<%#Eval("HienThi") %>' CommandName="CapNhatHienThi"
                          CommandArgument='<%#Eval("IDSP").ToString() + "_"+ Eval("HienThi").ToString()%>' runat="server" />   
                    </th>
                </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>
